#ifndef SIPMESSAGECOMMON_HPP_
#define SIPMESSAGECOMMON_HPP_

#include <stdint.h>
#include <string>
#include <list>

namespace sips
{

typedef struct tagsSub
{
    std::string szName;
    std::string szAddress;
    std::string szResType;
    std::string szResSubType;
    std::string szPrivilege;
    std::string szStatus;
    std::string szLongitude;
    std::string szLatitude;
    std::string szElevation;
    std::string szSeriesNumber;
    std::string szRoadway;
    std::string szPileNo;
    std::string szTotalSpace;
    int iMaxRecord;
    int iMaxVOD;
    std::string szFreeSpace;
    int iCurrentRecord;
    int iCurrentVOD;
    std::string szDecoderTag;
    std::string szOperateType;
    std::list<std::string>CameraAddressList;
} SSub;

typedef struct tagsCatalog
{
public:
    //static char* Variable;
    std::string szParent;
    int iSubNum;
    int iResult;
    std::list<SSub> SubList;

    tagsCatalog():iSubNum(-1), iResult(-1)
    {
    }
} SCatalog;


typedef struct tagsPTZCommand 
{
    //static const char *const Variable;
    std::string szPrivilege;
    std::string szCommand;
    std::string szAddress;
    int iResult;
    tagsPTZCommand():iResult(-1)
    {}
} SPTZCommand;



typedef struct tagsPort
{
    std::string szIp;
    int iPort;
    std::string szUDP;
    tagsPort():iPort(-1)
    {
    }
} SPort;

typedef struct tagsRealMedia
{
    //static const char *const Variable;
    std::string szFormat;
    std::string szVideo;
    std::string szAutio;
    SPort sSendSocket;
    SPort sReceiveSocket;
    std::string szDecoderTag;
    int iMulticast;
    int iResult;
    int iBitrate;
    int iMaxBitrate;
    std::string szPrivilege;
} SRealMedia;



typedef struct tagsAlarmSubscribe 
{
    //static const char *const Variable;
    int iAlarmType;
    int iLevel;
    std::string szAddress;
    std::string szPrivilege;
    std::string szAcceptIp;
    int iAcceptPort;
    tagsAlarmSubscribe():iAcceptPort(-1),iAlarmType(-1),iLevel(-1)
    {
    }
} SAlarmSubscribe;

typedef struct tagsAlarm 
{
    //static const char *const Variable;
    std::string szAddress;
    int iLevel;
    int iAlarmType;
    tagsAlarm():iLevel(-1),iAlarmType(-1)
    {
    }
} SAlarm;

typedef struct tagsDeviceInfo
{
    //static const char* const Variable;
    std::string szPrivilege;
    int iResult;
    int iOnline;
    int iStatus;
    tagsDeviceInfo():iResult(-1),iOnline(-1),iStatus(-1)
    {
    }
} SDeviceInfo;

typedef struct tagsEncoderSet
{
    //static const char* const Variable;
    std::string szPrivilege;
    std::string szFormat;
    int iFrameRate;
    int iBitRate;
    int iPriority;
    int iGOP;
    int iResult;

    tagsEncoderSet():iFrameRate(-1),iBitRate(-1),iPriority(-1),iGOP(-1),iResult(-1)
    {
    }
} SEncoderSet;

typedef struct tagsTimeSet
{
    //static const char* const Variable;
    std::string szPrivilege;
    std::string szTime;
    int iResult;
    tagsTimeSet():iResult(-1)
    {
    }
}STimeSet;

typedef struct tagsFileItem 
{
    std::string szname;
    std::string szCreationTime;
    std::string szLastWriteTime;
    int iFileSize;

    tagsFileItem():iFileSize(-1)
    {
    }
} SFileItem;

typedef struct tagsFileList
{
    //static const char* const Variable;
    std::string szPrivilege;
    int iFileType;
    int iMaxFileNum;
    std::string szBeginTime;
    std::string szEndTime;
    int iResult;
    int iRealFileNum;
    int iSendFileNum;
    int iRemainFileNum;
    std::list<SFileItem> itemlist;
    tagsFileList():iFileType(-1),iMaxFileNum(-1),iResult(-1),iRealFileNum(-1),iSendFileNum(-1),iRemainFileNum(-1)
    {
    }
} SFileList;


typedef struct tagsVOD
{
    //static const char* const Variable;
    std::string szPrivilege;
    int iFileType;
    std::string szname;
    std::string szCreationTime;
    std::string szLastWriteTime;
    int iMaxBitrate;
    int iResult;
    int iBitrate;
    std::string szPlayurl;
    tagsVOD():iFileType(-1),iMaxBitrate(-1),iResult(-1),iBitrate(-1)
    {
    }
} SVOD;

typedef struct tagsPlan
{
    std::string szPlanName;
    std::string szUsage;
    int iOverWrite;
    std::string szStartTime;
    std::string szEndTime;
    std::string szPrivilege;
    int iPlanType;
    int iMulticast;
    SPort SReceiveSocket;
    int iPlanStatus;
    int iPriority;

    tagsPlan():iOverWrite(-1),iPlanType(-1),iPriority(-1),iMulticast(-1),iPlanStatus(-1)
    {
    }
} SPlan;


typedef struct tagsPlanList
{
    //static const char* const Variable;
    std::string szPrivilege;
    std::string szCameraAddress;
    int iResult;
    int iRealPlanNum;
    int iSendPlanNum;
    int iRemainPlanNum;
    std::list<SPlan>planlist;
    tagsPlanList():iResult(-1),iRealPlanNum(-1),iSendPlanNum(-1),iRemainPlanNum(-1)
    {
    }
} SPlanList;

typedef struct  tagsPlanSet
{
    //static const char* const Variable;
    std::string szPlanName;
    std::string szCameraAddress;
    std::string szUsage;
    int iOverWrite;
    std::string szStartTime;
    std::string szEndTime;
    int iPlanType;
    std::string szPrivilege;
    int iPriority;
    int iMulticast;
    int iResult;
    int iPlanStatus;
    std::string szProtocol;
    SPort SReceiveSocket;
    tagsPlanSet():iOverWrite(-1),iPlanType(-1),iPriority(-1),iMulticast(-1),
        iResult(-1),iPlanStatus(-1)
    {
    }
} SPlanSet;

typedef struct tagsPlanStart
{
    //static const char* const Variable;
    std::string szPlanName;
    std::string szCameraAddress;
    std::string szPrivilege;
} SPlanStart;


typedef struct tagsTimeGet
{
    //static const char* const Variable;
    std::string szPrivilege;
} STimeGet;


typedef struct tagsAlarmNotify
{
    //static const char* const Variable;
    int iAlarmType;
    int iResult;
    tagsAlarmNotify():iResult(-1)
    {
    }
} SAlarmNotify;


typedef struct tagsKeepAlive
{
    //static const char* const Variable;
    int iResult;
    tagsKeepAlive():iResult(-1)
    {
    }
} SKeepAlive;


const char* GetVariableName(const SCatalog& t);

const char* GetVariableName(const SPTZCommand& t);

const char* GetVariableName(const SRealMedia& t);

const char* GetVariableName(const SAlarmSubscribe& t);

const char* GetVariableName(const SAlarm& t);

const char* GetVariableName(const SDeviceInfo& t);

const char* GetVariableName(const SEncoderSet& t);

const char* GetVariableName(const STimeSet& t);

const char* GetVariableName(const SFileList& t);

const char* GetVariableName(const SVOD& t);

const char* GetVariableName(const SPlanList& t);

const char* GetVariableName(const SPlanSet& t);

const char* GetVariableName(const SPlanStart& t);

const char* GetVariableName(const STimeGet& t);

const char* GetVariableName(const SAlarmNotify& t);

const char* GetVariableName(const SKeepAlive& t);



}//name

#endif //SIPMESSAGECOMMON_HPP_